<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title>弓友之家</title>
    <link rel="stylesheet" href="css/mui.css" />
    <link rel="stylesheet" href="fonts/iconfont.css" />
    <link rel="stylesheet" href="css/style.css" />
</head>
<body>
	<header class="mui-bar mui-bar-nav">
		<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
		<h1 class="mui-title">团队详情</h1>
		<a class="mui-icon mui-icon-more-filled mui-pull-right shareBtn"></a>
	</header>
	<div class="mui-content">
		<div class="member-page">
			<img src="" class="touxiang" />
			<h3>团队简单介绍：</h3> 
			<article class="desc">
				
			</article>
			<h3>比赛历史记录：</h3>
			<article class="content">
				
			</article>
		</div>
	</div> 
	<!--分享-->
	<div class="shareWx mui-hidden"> 
		<ul class="mui-list-unstyled">
			<li class="tel"><a href="javascript:void(0)" onclick="shareWeixinMessage(1)">微信好友</a></li>
			<li class="qq"><a href="javascript:void(0)" onclick="shareWeixinMessage(2)">朋友圈</a></li>
		</ul>
		<button type="button" class="cancleShare">取消</button>
	</div>
	<script type="text/javascript" src="js/mui.min.js" ></script>
	<script type="text/javascript" src="js/jquery-1.8.3.min.js" ></script>
	<script type="text/javascript" src="js/common.js" ></script>
	<script type="text/javascript" src="js/mui.zoom.js" ></script>
	<script type="text/javascript" src="js/mui.previewimage.js" ></script>
	<script type="text/javascript" charset="utf-8">
      	mui.init();
      	var id=0;
      	var teamimg="";
      	var teamname="";
      	mui.plusReady(function(){ 
      		var _self=plus.webview.currentWebview();
      		id=_self.mid;
      		mui.ajax(H_SRC+'/amier/user/team_detail',{
				data:{
					token:token,
					id:id
				},
				dataType:'json',
				type:'post',
				timeout:10000,             
				success:function(data){
					var dataurl=data.data;
					if(data.code == 1){
						$(".content").html(dataurl.win_record);
						$(".desc").html(dataurl.des);
						$(".touxiang").attr("src",H_SRC+''+dataurl.logo);
						teamimg=H_SRC+dataurl.logo;
						teamname=dataurl.name;
					}else{
						mui.toast(data.msg);
					}
				},
				error:function(){
					
				}
			}) 
      	})
      	mui.previewImage();
      	function message(){
      		$(".message-box").removeClass("mui-hidden");
      	}
      	
      	function shareWeixinMessage(type){
			var type=type;
			if(type==1){
				var secne="WXSceneSession"
			}else{
				var secne="WXSceneTimeline"
			}
			sharewx.send( 
				{ 
					title:teamname,
					content:teamname, 
					href:H_SRC+'/team_detail/'+id,
					thumbs: [teamimg], 
		        	pictures: [teamimg], 
					extra:{scene:secne}
				}, 
				function(){
					mask.close();
					$(".shareWx").addClass("mui-hidden");
					mui.toast( "分享成功！" );
				}, function(e){
					mask.close();
					$(".shareWx").addClass("mui-hidden");
					mui.toast( "取消分享");
				}
			);
		}
    </script>
</body>
</html>